home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 12511500 / var1308.dms / var1308.adf / DNET2_10.LHA / DNet / Amiga / Sourcen.lha / client / statdnet.c < prev    next >
C/C++ Source or Header  |  1993-01-14  |  673b  |  51 lines

  1.  
  2. /*
  3.  *  STATDNET.C
  4.  *
  5.  *  DNET (c)Copyright 1988, Matthew Dillon, All Rights Reserved.
  6.  *
  7.  *  STATDNET [-Nnet]
  8.  *
  9.  */
  10.  
  11. #include "defs.h"
  12.  
  13. void main ARGS((int, char **));
  14.  
  15. char buf[2048];
  16.  
  17. int
  18. brk()
  19. {
  20.     return(0);
  21. }
  22.  
  23. void
  24. main(ac,av)
  25. char *av[];
  26. {
  27.     int ok;
  28.     char *host = NULL;
  29.  
  30.     printf("StatDNet V%s%s\n", VERSION, STATDNET_VERSION);
  31.     onbreak(brk);
  32.  
  33.     {
  34.     short i;
  35.     for (i = 1; i < ac; ++i) {
  36.         if (strncmp(av[i], "-N", 2) == 0) {
  37.         host = av[i] + 2;
  38.         continue;
  39.         }
  40.     }
  41.     }
  42.     fflush(stdout);
  43.     buf[0] = 0;
  44.     ok = DStat(host, (APTR)buf, 2048);
  45.     if (ok)
  46.     write(1, buf, strlen(buf));
  47.     else
  48.     puts("DNET master port for network not found");
  49. }
  50.  
  51.